﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class UserControl_ucCategory : System.Web.UI.UserControl
{
    int cateId;

    CategoryController cateControl;
    ProductsController productControl;

    public DataTable dtCategory;
    public DataTable dtProduct;
    protected void Page_Load(object sender, EventArgs e)
    {
        cateId = Convert.ToInt32(Request.QueryString["cateId"]);

        cateControl = new CategoryController();
        productControl = new ProductsController();

        dtCategory = cateControl.getCategoryByID(cateId);
        dtProduct = productControl.GetProductByCateId(cateId);

        dtlTest.DataSource = dtProduct;
        dtlTest.DataBind();
    }
}